package com.guoxin.designpattern.chapter7;

/**
 * @author guoxin
 * @date 2019/9/5
 */
public class UsePersonThread extends Thread {
    private final Person person;

    public UsePersonThread(Person person) {
        this.person = person;
    }

    @Override
    public void run() {
        for (; ; ) {
            System.out.println(Thread.currentThread().getName() + " = " + person.toString());
        }
    }
}
